<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title> 历史余额查询(</title>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="小镖人、社区、网络货运">
    <meta name="description" content="小镖人、社区、网络货运">
    <link rel="stylesheet" href="../../../../xbr_layui_extend/layui-v2.6.8/css/layui.css">
    <style>
        .input-container {
            display: flex;
        }

        .input-container input {
            flex: 1;
            margin-right: 0px;
        }

        tr td:nth-child(1),
        tr td:nth-child(3) {
            background-color: #E8EAED; /* 设置背景颜色 */
        }

    </style>
</head>
<body>
<div class="layui-fluid" style="padding: 15px;">
    <form class="layui-form" action="" lay-filter="form-initPlat" id="userForm" method="post"
          style="margin-bottom: 80px">
        <div class="input-container">
            <div class="layui-form-item">
                <label class="layui-form-label"  style="text-align: left">查询条件：</label>
                <div class="layui-input-block">
                    <input type="text" name="companyNo" required lay-verify="required" placeholder="请输待查明的账号"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-inline">
                    <input type="text"  name="qryDate" id="dateRange" placeholder="请选择查询时间范围" class="layui-input">
                </div>
                <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="post-initPlat">查询</button>
            </div>
        </div>
        <table class="layui-table" style="border:1px solid cornsilk">
            <colgroup>
                <col width="100">
                <col width="250">
            </colgroup>
            <tbody>
            <tr>
                <td>账号</td>
                <td id="acntNo">无数据</td>

            </tr>
            <tr>
                <td>币种</td>
                <td id="currency">无数据</td>
            </tr>
            <tr>
                <td>余额</td>
                <td id="balance">无数据</td>
            </tr>
            </tbody>
        </table>
        <table id="tabel" lay-filter="test"></table>
    </form>
</div>


<script src="../../../../xbr_layui_extend/layui-v2.6.8/layui.js"></script>
<script>
    layui.extend({
        admin: '/platform/xbr_layui_extend/admin' //集成路径
    }).use(["admin", 'laydate','table', 'form'], function () {
        const $ = layui.$, form = layui.form, admin = layui.admin, element = layui.element, laydate = layui.laydate,table = layui.table;
        element.render('icon');
        // 初始化时间范围选择器
        laydate.render({
            elem: '#dateRange',
            range: false,
            format: 'yyyy-MM-dd' // 使用斜杠作为时间分隔符
        });
       -
        //上传完毕 提交表单
        form.render(null, 'form-initPlat');
        form.on('submit(post-initPlat)', function (data) {
            admin.req({
                url: "/platform/cmbc/getQryHistoryBal",
                data: {acntNo:data.field.companyNo,qryDate:data.field.qryDate},
                type: 'post',
                done: function (res) {
                    const  data=res.data;
                    document.getElementById('acntNo').innerHTML=data['acntNo'];
                    document.getElementById('currency').innerHTML=data['currency'];
                    document.getElementById('balance').innerHTML=data['balance'];
                }
            });
            return false;
        });

    });
</script>
</body>
</html>